$execute if data storage vs:system gamerules[$(index)].operation_condition store result score #success temp run function vs:system/hub/menu/gamerule_settings/operation/condition_test/run with storage vs:system gamerules[$(index)]
execute if score #success temp matches 0 run return run scoreboard players reset #success temp

$execute store result score #value temp run data get storage vs:system gamerules[$(index)].value
$execute store result score #change temp run data get storage vs:system gamerules[$(index)].change

$execute store result score #min temp run data get storage vs:system gamerules[$(index)].min
scoreboard players operation #value temp -= #change temp
scoreboard players operation #min temp -= #change temp

$execute unless data storage vs:system gamerules[$(index)].min run scoreboard players set #min temp -2147483648

$execute if score #value temp > #min temp store result storage vs:system gamerules[$(index)].value int 1.0 run scoreboard players get #value temp

scoreboard players reset #change temp
scoreboard players reset #value temp
scoreboard players reset #min temp
scoreboard players reset #success temp

$execute as @n[type=item_display,tag=hub.gameruleSettings.selectGamerule,distance=..10] at @s run function vs:system/hub/menu/gamerule_settings/read {index:$(index)}